package com.zhr.tea.model.impl;

import com.zhr.tea.api.RetroManager;
import com.zhr.tea.entity.postbean.PostBean;
import com.zhr.tea.model.ICarModel;

import rx.Subscriber;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;

import static com.zhr.tea.api.CarService.BASE_URL;

/**
 * .::::.
 * .::::::::.
 * :::::::::::
 * ..:::::::::::'
 * '::::::::::::'
 * .::::::::::
 * '::::::::::::::..
 * ..::::::::::::.
 * ``::::::::::::::::
 * ::::``:::::::::'        .:::.
 * ::::'   ':::::'       .::::::::.
 * .::::'      ::::     .:::::::'::::.
 * .:::'       :::::  .:::::::::' ':::::.
 * .::'        :::::.:::::::::'      ':::::.
 * .::'         ::::::::::::::'         ``::::.
 * ...:::           ::::::::::::'              ``::.
 * ```` ':.          ':::::::::'                  ::::..
 * '.:::::'                    ':'````..
 * Created by 毛懿 on 2016/11/1 14:54.
 * 邮箱：1334964028@qq.com
 */

public class CarModelImpl implements ICarModel {
    @Override
    public void getCarData(PostBean postBean, Subscriber<String> subscriber) {
        RetroManager.getInstance(BASE_URL)
                .getCarService()
                .getCarData(postBean)
                .observeOn(AndroidSchedulers.mainThread())
                .subscribeOn(Schedulers.io())
                .subscribe(subscriber);
    }


}
